package week04.homework01MazeGame.settings;

/**
 * @author li
 */
public enum MonsterGrowth {
    /**
     * 定义怪物不同等级的成长值
     */
    JUVENILE(10, 5, 3, 2),
    ADULT(20, 10, 5, 5),
    ELITE(30, 15, 7, 10),
    BOSS(100, 20, 10, 40);

    /**
     * 不同属性的成长值
     */
    private final int healthGrowth;
    private final int defenseGrowth;
    private final int attackGrowth;
    private final int expGrowth;

    MonsterGrowth(int healthGrowth, int defenseGrowth, int attackGrowth, int expGrowth) {
        this.healthGrowth = healthGrowth;
        this.defenseGrowth = defenseGrowth;
        this.attackGrowth = attackGrowth;
        this.expGrowth = expGrowth;
    }

    public int getHealthGrowth() {
        return healthGrowth;
    }

    public int getDefenseGrowth() {
        return defenseGrowth;
    }

    public int getAttackGrowth() {
        return attackGrowth;
    }

    public int getExpGrowth() {
        return expGrowth;
    }

    /**
     * 可添加获取等级名称的方法便于显示
     * @return 等级名称
     */
    public String getLevelName() {
        return switch (this) {
            case JUVENILE -> "幼年期";
            case ADULT -> "成年期";
            case ELITE -> "精英级";
            case BOSS -> "BOSS级";
        };
    }

}
